package com.linkoog.devtools.raw_index;

import com.intellij.notification.Notification;
import com.intellij.notification.NotificationGroup;
import com.intellij.notification.NotificationType;
import com.intellij.notification.Notifications;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.ReadAction;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.progress.Task;
import com.intellij.openapi.project.DumbService;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.ProjectFileIndex;
import com.intellij.openapi.startup.StartupActivity;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.VirtualFileManager;
import com.intellij.psi.PsiClass;
import com.intellij.psi.PsiElement;
import com.intellij.util.indexing.DumbModeAccessType;
import com.intellij.util.messages.MessageBusConnection;
import com.linkoog.devtools.utils.PsiClassUtils;
import org.jetbrains.annotations.NotNull;

import javax.swing.*;
import java.util.List;

public class PsiRawFileIndexStartup implements StartupActivity.RequiredForSmartMode {

    private static final Logger log = Logger.getInstance(PsiRawFileIndexStartup.class);


    @Override
    public void runActivity(@NotNull Project project) {
        ApplicationManager.getApplication().executeOnPooledThread(() -> {
            PsiRawFileIndexManager.registerFileChangeEvent(project);
            PsiRawFileIndexManager.rawFileIndexInit(project);
            PsiRawFileIndexManager.rawFileIndexDataScanAndBuild(project);
        });
    }



}
